perturbation-sim: resilience arc — meta-hop → buffer → exploration → fail-first scorecard#509
Conversation
…fail-first scorecard Builds on the #504 base (eigenvalue-perturbation + edge-propagation simulator), adding the cognitive/decision layers and the spectral exploration battery. All additive to crates/perturbation-sim; nothing else in the workspace changes. New modules (src/): timing (meta-hop cascade + inertia×phase between-level model + collapse number), rolling_floor (HDR/Belichtungsmesser early-exit over the L1-L4 HHTL eigenmode tiers + weyl_over_fiedler modifier), resilience (λ₂ + Kirchhoff index = the self-inverse L⁺ certificate, read once), buffer (impulse storage + Ketchup yield — the transient axis, orthogonal to λ₂/Kirchhoff). New examples: meta_hops, validate_mediators (Pearson/Spearman/Cronbach α/ICC battery), modifier_validity, rolling_floor, resilience, buffer, explore (self-inverse + interlacing + equitability + analytic + N-2 probes), scorecard (cross-country fail-first investment locator). Findings (real Iberian/European PyPSA cores, all graded in PAPER §4.7-§4.13): - self-inverse reference L↔L⁺ verified exact in code (MP identities 1e-13); analytic λ₂/Kf match path/cycle/complete closed forms — engine sound [G]. - validity battery: Fiedler edge-sensitivity is the valid cascade-size predictor (ρ=0.77); reliability ICC 0.71 / Cronbach α 0.91. - the modifier m=Weyl×(1/Fiedler) was confounded with the Kirchhoff index (1/λ₂ is its dominant term); the BUFFER (inertia storage) is the genuinely independent axis (Spearman(λ₂,buffer)≈0). - resilience as a perturbation-agnostic certificate (read once, never re-predict), dissolving the circularity; reinforcement raises λ₂ +136% / lowers Kf −27%. - cross-country: equitability never holds on real grids; FR top cut ambiguous (gap/λ₂=0.37); N-2 super-additivity up to 3.55×; the France paradox (lowest λ₂ yet stable via nuclear buffer) validates the two-axis split. - fail-first investment locator: binding constraint → product (buffer→synchronous inertia; Spain −50%), the predictive-vulnerability case. Honest scope: topology measured; inertia/policy are transparent priors. 67 lib tests; clippy -D warnings clean; fmt clean.
|
Warning Review limit reached
More reviews will be available in 27 minutes and 34 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (17)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b689f51013
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let inv_sum: f64 = eigenvalues | ||
| .iter() | ||
| .filter(|&&l| l > tol) | ||
| .map(|&l| 1.0 / l) |
There was a problem hiding this comment.
Preserve disconnected components in Kirchhoff index
When the spectrum has more than one zero mode (an islanded/disconnected graph), this filter drops all of those zero modes and sums only the finite component spectra, so e.g. [0, 0, 2, 2] returns a finite Kf even though cross-component effective resistance is infinite. The new resilience/scorecard paths use mean_resistance() as a resilience/exposure axis, so an already-disconnected compartment can be ranked as resilient instead of failing; detect modes < n - 1 and return INFINITY/invalid for that case.
Useful? React with 👍 / 👎.
| if field.abs() >= threshold { | ||
| depth += 1; |
There was a problem hiding this comment.
Base phase depth on the current tier amplitude
If a tier absorbs the perturbation (g == 0), signed_amp becomes zero for all following tiers, but field still contains the earlier seed; counting penetration from this cumulative field therefore reports every later tier as reached whenever the seed exceeded threshold. The synthetic meta_hops run already shows magnitude amplitudes 1,0,0,0,0 while the phase model reports depth 4, so downstream timing/exploration results overstate cascade penetration; count the current reachable contribution or stop once the propagated amplitude is below threshold.
Useful? React with 👍 / 👎.
… study (epiphanies-first) A standalone, mathematically-verifiable study document: epiphanies-first abstract (EN+DE), the formal three-axis model (topology λ₂/Kf measured · buffer · policy), the per-country scorecard with detailed stats, the fail-first investment locator, the validity/reliability battery, the [G] verification table (self-inverse 1.3e-13, analytic closed forms, interlacing), honest scope, and a reproduction appendix mapping every number to a named example + a grade ledger. Headline: the France paradox — FR and ES have near-identical measured topology (λ₂ 3.06e-7 vs 3.15e-7) yet 4.6× different exposure, recovered only by the separated buffer/policy axes. Topology measured [G]; inertia/policy priors [S]; 'predicts the blackout' explicitly NOT claimed (structural screen).
…on, P2 meta-hop depth) P1 (resilience.rs): kirchhoff_index now returns INFINITY when the graph is disconnected (finite modes < n−1, i.e. ≥2 zero modes). Previously it summed only the live-component spectra and returned a FINITE Kf for a fragmented graph, which would rank an already-disconnected compartment as resilient (low Kf) — backwards. mean_resistance propagates ∞, so a disconnected basin now ranks most-exposed. New test disconnected_graph_has_infinite_kirchhoff. P2 (timing.rs): meta_cascade_phase penetration depth now counts the ARRIVING contribution |signed_amp| (the front), not the cumulative interference field. Once a tier absorbs the front (g→0) no deeper tier is reached, even though the bundled field retains the earlier seed — the old field-based count overstated reach (synthetic 1,0,0,0 reported depth 4). Front reach is gain-driven and phase-independent (|±x|=x); phase governs the field interference, reported in the MetaHop.field column. Test reframed (phase_governs_the_field_not_the_front_depth) + PAPER §4.7 corrected to the true ES number (front penetration 3/4, field peak |Σ|=1.95) EN+DE; meta_hops label fixed. 68 lib tests; clippy -D warnings clean; scorecard/explore numbers unchanged (connected components).
|
Both Codex findings addressed in P1 — Kirchhoff index on disconnected graphs ( P2 — meta-hop penetration depth ( 68 lib tests pass, Generated by Claude Code |
PR #511 merged 2026-06-16 19:01 UTC (merge commit c3dddfc) on main — +886/-0 additive substrate calibration in perturbation-sim: examples/calibrate.rs (ICC/Spearman/Pearson/Cronbach α battery against perturbation-sim as ground truth), src/columns.rs (calibrated SoaMemberSpec, spec only), src/hhtl.rs, examples/hhtl_grid.rs, CLAM_CHAODA_FRAMING.md. Headline locks: - 5 contingency factors certify by VALUE at 2-bit linear (ICC ≥ 0.96) — existing palette/turbovec tenants suffice; §10 "statistics survive the encoding" CONFIRMED. - α preserved within Δ ≤ 0.02 at ≥4-bit; read ≥6-bit for orthogonality. - inertia_buffer is the one genuinely additive member — orthogonal to topology per #509 (Spearman(λ₂, buffer) ≈ 0). Spec only; promotion gated by §0 anti-invention guardrail. - d_lambda2's ICC=0 was a variance-guard underflow at ~1e-7 magnitude; two prior guesses (heavy-tail / near-constant) retracted on the run. - Significance per Jirak n^(p/2−1) (I-NOISE-FLOOR-JIRAK). - Does NOT touch the operator-locked canonical_node. Files updated this commit: - PR_ARC_INVENTORY.md PREPEND #511 entry - LATEST_STATE.md dated bullet + Recently-Shipped row - AGENT_LOG.md PREPEND session entry covering both odoo-rs SEED (cross-repo, commit ebfb2c3 on AdaWorldAPI/odoo-rs main) AND this #511 board hygiene. Retroactive cleanup (merge landed before the same-commit hygiene rule could fire — the AGENT_LOG entry records this). https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
PR #511 merged 2026-06-16 19:01 UTC (merge commit c3dddfc) on main — +886/-0 additive substrate calibration in perturbation-sim: examples/calibrate.rs (ICC/Spearman/Pearson/Cronbach α battery against perturbation-sim as ground truth), src/columns.rs (calibrated SoaMemberSpec, spec only), src/hhtl.rs, examples/hhtl_grid.rs, CLAM_CHAODA_FRAMING.md. Headline locks: - 5 contingency factors certify by VALUE at 2-bit linear (ICC ≥ 0.96) — existing palette/turbovec tenants suffice; §10 "statistics survive the encoding" CONFIRMED. - α preserved within Δ ≤ 0.02 at ≥4-bit; read ≥6-bit for orthogonality. - inertia_buffer is the one genuinely additive member — orthogonal to topology per #509 (Spearman(λ₂, buffer) ≈ 0). Spec only; promotion gated by §0 anti-invention guardrail. - d_lambda2's ICC=0 was a variance-guard underflow at ~1e-7 magnitude; two prior guesses (heavy-tail / near-constant) retracted on the run. - Significance per Jirak n^(p/2−1) (I-NOISE-FLOOR-JIRAK). - Does NOT touch the operator-locked canonical_node. Files updated this commit: - PR_ARC_INVENTORY.md PREPEND #511 entry - LATEST_STATE.md dated bullet + Recently-Shipped row - AGENT_LOG.md PREPEND session entry covering both odoo-rs SEED (cross-repo, commit ebfb2c3 on AdaWorldAPI/odoo-rs main) AND this #511 board hygiene. Retroactive cleanup (merge landed before the same-commit hygiene rule could fire — the AGENT_LOG entry records this). https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
PR #511 merged 2026-06-16 19:01 UTC (merge commit c3dddfc) on main — +886/-0 additive substrate calibration in perturbation-sim: examples/calibrate.rs (ICC/Spearman/Pearson/Cronbach α battery against perturbation-sim as ground truth), src/columns.rs (calibrated SoaMemberSpec, spec only), src/hhtl.rs, examples/hhtl_grid.rs, CLAM_CHAODA_FRAMING.md. Headline locks: - 5 contingency factors certify by VALUE at 2-bit linear (ICC ≥ 0.96) — existing palette/turbovec tenants suffice; §10 "statistics survive the encoding" CONFIRMED. - α preserved within Δ ≤ 0.02 at ≥4-bit; read ≥6-bit for orthogonality. - inertia_buffer is the one genuinely additive member — orthogonal to topology per #509 (Spearman(λ₂, buffer) ≈ 0). Spec only; promotion gated by §0 anti-invention guardrail. - d_lambda2's ICC=0 was a variance-guard underflow at ~1e-7 magnitude; two prior guesses (heavy-tail / near-constant) retracted on the run. - Significance per Jirak n^(p/2−1) (I-NOISE-FLOOR-JIRAK). - Does NOT touch the operator-locked canonical_node. Files updated this commit: - PR_ARC_INVENTORY.md PREPEND #511 entry - LATEST_STATE.md dated bullet + Recently-Shipped row - AGENT_LOG.md PREPEND session entry covering both odoo-rs SEED (cross-repo, commit ebfb2c3 on AdaWorldAPI/odoo-rs main) AND this #511 board hygiene. Retroactive cleanup (merge landed before the same-commit hygiene rule could fire — the AGENT_LOG entry records this). https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
What
Builds on the #504 base (the eigenvalue-perturbation + edge-propagation outage simulator) with the cognitive/decision layers and a spectral exploration battery. Purely additive to
crates/perturbation-sim— nothing else in the workspace changes. 67 lib tests,clippy -D warningsclean,fmtclean.New source modules (
src/)timingimodifiesi+1) + inertia × phase between-level model (bipolar phase composes, magnitude bundles, inertia = the clock) + the dimensionless collapse numberΠrolling_floormu+kσfloor);weyl_over_fiedlermode-instability modifierresilienceλ₂+ Kirchhoff indexKf = n·trace(L⁺)— the perturbation-agnostic certificate read once from the self-inverseL⁺referencebufferλ₂/Kirchhoff by constructionNew examples
meta_hops,validate_mediators(Pearson / Spearman / Cronbach α / ICC battery),modifier_validity,rolling_floor,resilience,buffer,explore(self-inverse + interlacing + equitability + analytic + N-2 probes),scorecard(cross-country fail-first investment locator).Findings (real Iberian / European PyPSA cores; graded in
PAPER.md§4.7–§4.13)L↔L⁺verified exact in code (Moore-Penrose identities to 1e-13);λ₂/Kfmatch exact path/cycle/complete closed forms.m = Weyl×(1/Fiedler)was confounded with the Kirchhoff index (1/λ₂is its dominant term). The buffer (inertia storage) is the genuinely independent axis (Spearman(λ₂, buffer) ≈ 0).L⁺(integrates over all perturbations), dissolving the §4.9.1 circularity; the max-margin corridor raisesλ₂ +136%/ lowersKf −27%.gap/λ₂=0.37); N-2 super-additivity up to 3.55×; the France paradox (lowest λ₂ yet stable via nuclear buffer) validates the two-axis split.Honest scope
Topology is measured from the PyPSA grid; inertia (
H_eff) and policy are transparent priors (tagged[prior]), so scorecard percentages are structural, not costed — real per-bus inertia + curtailment data turns the same machine into a costed ROI per site. The DC/spectral layer remains a structural-vulnerability screen (the 28 Apr 2025 event was a voltage collapse — the AC fork's domain), per #504's framing.Notes
main(post-perturbation-sim: eigenvalue-perturbation + edge-propagation outage simulator #504/feat: 4-task unblock-cascade — NiblePath::from_guid_prefix + MailboxSoaOwner impl + LanceVersionScheduler + SurrealMailboxView (D-PG-6) #507); the branch contains only the newperturbation-simfiles (16 files, +3480/−2).ada-docs(separate repo).https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
Generated by Claude Code